package LawsonTransformJava.main;

import java.io.File;
import java.io.IOException;
import java.sql.SQLException;

import LawsonTransformJava.pgm.PA526;


public class PA526Main extends ClassMain {

	/**
	 * @author edavis
	 */
	
	private static final String OUTPUTLOCATION = "z:/conversions/dataload";
	
	public static void main(String[] args) {
		if (args.length!=0) {
			usage();
		}
		Thread thread1 = null;
		File outFile = new File(OUTPUTLOCATION + "/REVLOADCSV_" + getDate());
		// TODO Create Error output logic
		File errFile = new File(OUTPUTLOCATION + "/REVLOADCSV_ERROR_" + getDate());
		File convRpt = new File(OUTPUTLOCATION + "/REV_PA526TransformationReport_" + getDate() + ".txt");

		System.out.println("CLASSPATH=" + System.getenv("CLASSPATH"));
		System.out.println("WHERECLAUSE=" + System.getenv("WHERECLAUSE"));
		PA526 objDAO = null;
		objDAO = new PA526(outFile, errFile, convRpt);
		
		if (objDAO!=null) {
			thread1 = new Thread(objDAO);
//			objDAO.setWhereClause(" WHERE REVIEW.EMPLOYEE=100050");
			thread1.start();
		}
	}

	private static void usage() {
		System.err.println("Usage - PA526Main");
		System.exit(1);
	}
}
